<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="cfn" uri="http://francetelecom.com/cfn"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/fn"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@page import="org.springframework.validation.Errors"%>

<%-- Creates a form period selector. Parameters are :
    - code : the label code for the input
    - path : the path for the input
    - focused : optional, value must be "focused" to focus the input
    - mandatory : optional, boolean string value, 'true' if the field is mandatory.
    - usePartialValue : optional, boolean string value, 'true' if the related label info box
      must display a label notifying the user that he can use partial values.
--%>

<jsp:include page="form-field-header.jsp">
  <jsp:param name="code" value="${param.code}"/>
  <jsp:param name="mandatory" value="${param.mandatory}"/>
  <jsp:param name="usePartialValue" value="${param.usePartialValue}"/>
</jsp:include>

<%-- Displaying the form field --%>
<span class="phoneNb">
  <form:input cssClass="cc ${classVal}" path="${param.path}.countryCode"
    cssErrorClass="cc error" size="6"/>

  <c:set var="fieldPath" value=""/>
  <form:input cssClass="sn ${classVal}" path="${param.path}.number"
    cssErrorClass="sn error" size="20"/>
</span>

<%-- Displaying the form field error message --%>
<jsp:include page="form-field-errors.jsp">
  <jsp:param name="path" value="${param.path}"/>
</jsp:include>

<jsp:include page="form-field-footer.jsp"/>